import Vue from 'vue'
import Router from 'vue-router'
import main from '../../backend/html/article/add'
import single from '../../backend/html/article/index'  /*文章上传*/
import photo from '../../backend/html/photo/index'   /*照片上传*/
import '../../../static/css/backend/article/index.css'
import photoType from  '../../backend/html/photo/type.vue'  //照片类别
Vue.use(Router);

export default new Router({
  /*  mode:'history',*/
    routes: [
        {
            path: '/',
            name: 'main',
            component: main
        },
        {
            path: '/article',
            name: 'article',
            component: single
        },
        {
            path: '/photo',
            name: 'photo',
            component: photo
        },
        {
            path: '/photoType',
            name: 'photoType',
            component: photoType
        },
        {
            path: '**',   // 错误路由[写在最后一个]
            redirect: '/backend.html'   //重定向
        }
    ]
})
